﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using SSRSViewer.Core;

namespace SSRSViewer.Win
{
    partial class DateParameterUserControl : UserControl, IParameterEditor, IDateParameterUserControl
    {
        public DateParameterUserControl()
        {
            InitializeComponent();
        }

		public void Initialize() { }

        #region IParameterEditor Members

        public object EditValue
        {
            get
            {
                return editor.Value.Date;
            }
            set
            {
                if (value is DateTime)
                    editor.Value = Convert.ToDateTime(value);
                else
                    throw new InvalidCastException("DateTime value required!");
            }
        }
        public string Prompt
        {
            get { return lbPrompt.Text; }
            set { lbPrompt.Text = value; }
        }
        public RdlReportParameter EditingParameter { get; set; }
        #endregion
    }
}
